﻿//删除文件
function DeleteFiles(status)
{    
    var docIDList = "";    
    if(!Memberno||Memberno=="")
    {
        top.location = "/user/login.htm?IsShow=1&ReturnUrl="+top.location.href;
        return;
    }
    if(status=="curAll")
    {        
        var elments = $("MyFilesDoc").getElementsByTagName("input");
        for (var i=elments.length-1; i >= 0; i--)
        {
            if(elments[i].type=="checkbox"&& elments[i].checked)
            {
                docIDList+=elments[i].value;                
            }
        }
    }
    else
    {
        docIDList=status;
    }
    if(docIDList=="")
    {
        $("NoSelect").style.display="";
        return;
    }
    $("NoSelect").style.display="none";
    showProgressBar(false,true);
    $("$divIput$").style.display = "none";
    var body="<p><strong>"+isDelSure+"</strong></p><br/><div class='Popup_button'><input type='button' value='"+C0069+"' id='addOkButton' class='button' onclick=\"opWebService('"+docIDList+"')\" />&nbsp;&nbsp;<input type='button' value='"+gCancel+"' id='addCancelButton' class='buttong' onclick='webFailure()'/></div>";
    var obj = {}
    $ShowMessageBox$(delTitle,body,obj,webFailure,400);    
}
//执行
function opWebService(did)
{
    //WebServices.WWW.Files.DeleteFiles(this.did,onsuccOP,webFailure);
    $("delID").value = did;
    $("Form1").action = "/files/mydocs.htm?Flag=d";
    $("Form1").submit();
}
//调用webService方法失败
function webFailure()
{
    $EndMessageBox$();
}
//
function CheckDelBox(status)    
{
    var elments = $("MyFilesDoc").getElementsByTagName("input");
    for (var i=elments.length-1; i >= 0; i--)
    {
        if(elments[i].type=="checkbox")
        {
            elments[i].checked = status;
        }
    }
}
